import Taro, {Component} from '@tarojs/taro'
import {View, Button, Text, Swiper, SwiperItem, Image, ScrollView, Map,Picker} from '@tarojs/components'
import {connect} from '@tarojs/redux'
import {
  set_userinfo, set_cart, set_goodslist, set_viplist, set_bind_car_num, set_progress,
  set_pushdata, set_pushdatanum, gohome_btn, set_cart_num,
} from '../../actions/IndexAction'
import base from "../base"
import {AtTabs, AtTabBar, AtSegmentedControl, AtInput} from 'taro-ui'
import './index.less'
import set from "../../apis/api"

const width = wx.getSystemInfoSync().windowWidth;

 import LineChart from '../../components/LineChart'

var QQMapWX = require('../../components/qqmap/qqmap-wx-jssdk.js');

var qqmapsdk;
let intVal;

class add_devices extends Component {
  constructor(props) {
    super(props)
    base(this)
    this.state = {
      current: 0,
      value: "",
      d_sn: "",
      jz_normal_list: [],
      jz_error_list: [],
      id: "",
      dataStr: "",
      aca: 0,
      acv: 0,
      acw: 0,
      data: {},
      jd: 112,
      wd: 28,
      jzlist: [],
      current_b: 0,
      testdata: {},
      dateSel: '2020-01-01',

      showModel: true,
      homedata:null,
    }
  }

  config = {
    navigationBarTitleText: '基站首页',
    enablePullDownRefresh: true,
    navigationBarBackgroundColor: "#4bb33d",
    navigationBarTextStyle: "white"

  }

  onReachBottom() {


  }

  setMapLocation() {
    var new_jzlist = wx.getStorageSync("jzlist");
    if (new_jzlist) {
      this.setState({
        jzlist: JSON.parse(new_jzlist)
      }, () => {
        wx.removeStorageSync("jzlist")
      })
    } else {
      console.log("没有")
      this.setState({
        jd: this.state.detail.jd,
        wd: this.state.detail.wd,
        jzlist: [{
          id: this.state.detail.id,
          latitude: parseFloat(parseFloat(this.state.detail.wd).toFixed(10)),
          longitude: parseFloat(parseFloat(this.state.detail.jd).toFixed(10)),
          width: 30,
          height: 40,
          iconPath: "http://wx.engconn.com/static/uploads/2020-01-13/329751578929760.png",
          callout: {
            content: this.state.detail.name,
            borderRadius: 5,
            padding: 5,
            display: 'ALWAYS',
            textAlign: 'center'
          }
        }]
      }, () => {
        console.log(this.state.detail)
      })
    }
  }

  setLocation() {
    Taro.navigateTo({
      url: '/pages/gypage/mapSelect?jzlist=' + JSON.stringify(this.state.jzlist)
    })
  }

  upimage() {
    let that = this;
    this.chooseImage({
      count: 1,
    }).then((res) => {
      wx.uploadFile({
        url: set.up_img,
        filePath: res.tempFilePaths[0],
        name: 'img',
        formData: {
          access_token: that.props.gytoken.gytoken,
          b_id: that.state.detail.id,
        },
        success(res) {

          var data = JSON.parse(res.data)
          console.log('success:', data)
          that.state.detail.img = set.updomain + data.data;
          that.setState({
            detail: that.state.detail
          })
        },
        fail(err) {
          console.log("error:", err)
          wx.showToast({title: "上传失败，请重试", icon: "none"});
        }
      })

    })
  }



  saveJz(jzlist) {

    if(!this.state.detail||!this.state.detail.name)
    {
      wx.showToast({title:"请输入基站名称",icon:"none"})
      return;
    }

    wx.showLoading({title: "正在保存"})
    var databody = {
      access_token: this.props.gytoken.gytoken,
      wxid: this.props.sys_config.sets.wxid,
      id: this.state.detail.id,
      jd: jzlist[0].longitude,
      wd: jzlist[0].latitude,
      img: this.state.detail.img,
      name:this.state.detail.name
    }
    console.log(databody)
    this.wx_request(set.save_img, databody, "POST", {'Content-Type': 'application/x-www-form-urlencoded'}).then((data) => {
      wx.hideLoading();
      wx.stopPullDownRefresh();
      if (data.data.status == 100) {
        wx.showToast({title: "保存成功", icon: "none", duration: 1800})
        // setTimeout(()=>{
        //   Taro.navigateBack();
        // },500)

      }

    }).catch((err) => {

      console.log(err)
      wx.hideLoading();
      wx.stopPullDownRefresh();
      wx.showToast({
        title: '网络访问失败，请重试',
        icon: 'none',
        duration: 1800
      })
    })

  }

  componentWillReceiveProps(nextProps) {
    console.log(this.props, nextProps)
  }

  onPullDownRefresh() {
    this.fetchData();
    this.getHomeData()
    wx.stopPullDownRefresh();
  }


  componentDidShow() {
  //  this.writeCurrentDate()

    var data = JSON.parse(this.$router.params.item)
    this.setState({
      id: data.id,
      dataStr: this.$router.params.item
    }, () => {
      this.onPullDownRefresh()
    })

    if (!intVal) {
      intVal = setInterval(() => {
        console.log("更新详情")
        this.getDetail();
        this.getHomeData()
      }, 5000)
    }



  }

  componentDidHide() {
    console.log("消失")
    if(intVal)
    {
      clearInterval(intVal)
    }

  }



  goLocation() {
    var item = this.state.jzlist[0]
    if (!item || !this.state.detail) {
      wx.showToast({title: "导航失败。请重试"});
      return;
    }
    wx.openLocation({

      latitude: parseFloat(item.latitude),

      longitude: parseFloat(item.longitude),

      scale: 18,

      name: this.state.detail.name,

      address: this.state.detail.address

    })

  }

  back() {
    Taro.navigateBack()
  }

  getDeviceList() {
    wx.showLoading({title: "加载中"})
    var databody = {
      access_token: this.props.gytoken.gytoken,
      wxid: this.props.sys_config.sets.wxid,
      S_d_sn: this.state.d_sn
    }
    this.wx_request(set.jz_normal_list, databody, "POST", {'Content-Type': 'application/x-www-form-urlencoded'}).then((data) => {

      if (data.data.data.data) {
        this.setState({
          jz_normal_list: data.data.data.data
        })
      }
      console.log(data.data.data.data)
      wx.hideLoading();

    }).catch((err) => {
      wx.hideLoading();
      wx.stopPullDownRefresh();
      wx.showToast({
        title: '网络访问失败，请重试',
        icon: 'none',
        duration: 1800
      })
    })

  }

  getHomeData(){
    var databody = {
      access_token: this.props.gytoken.gytoken,
      wxid: this.props.sys_config.sets.wxid,
      b_id: this.state.id
    }
    this.wx_request(set.get_home_data, databody, "POST", {'Content-Type': 'application/x-www-form-urlencoded'}).then((data) => {

      wx.hideLoading();
      var detail = data.data.data.data;
      console.log("homedata", detail)
      var newData={};
      detail.map((item)=>{
        var name=item.list[0].value;
        item.list.map((s_item,key)=>{
          if(!newData[name])
          {
            newData[name]=[];
          }
          var arr_key=Math.floor((key-1) / 4)
          if(key!=0){
            if(!newData[name][arr_key])
            {
              newData[name][arr_key]=[];
            }
            if(s_item.value&&s_item.value.indexOf("}")==-1){
              newData[name][arr_key].push(s_item)
            }
          }
        })

      })
      console.log("newdata",newData)
      this.setState({
        homedata: newData,
        dataStr: JSON.stringify(detail)
      })

      // wx.setNavigationBarTitle({
      //   title: detail.name
      // })


    }).catch((err) => {
      console.log(err)
      wx.hideLoading();
      wx.stopPullDownRefresh();
      wx.showToast({
        title: '网络访问失败，请重试',
        icon: 'none',
        duration: 1800
      })
    })

    }
  getDetail_b() {
    wx.showLoading({title: "加载中"})
    var databody = {
      access_token: this.props.gytoken.gytoken,
      wxid: this.props.sys_config.sets.wxid,
      id: this.state.id
    }
    this.wx_request(set.get_data, databody, "POST", {'Content-Type': 'application/x-www-form-urlencoded'}).then((data) => {

      var detail = data.data.data;
    //  console.log("detail", detail)
      this.setState({
        detail: detail,
        dataStr: JSON.stringify(detail)
      }, () => {
        this.getDetail()
        this.getDeviceList()
        this.setMapLocation()
      })

      // wx.setNavigationBarTitle({
      //   title: detail.name
      // })


    }).catch((err) => {
      wx.hideLoading();
      wx.stopPullDownRefresh();
      wx.showToast({
        title: '网络访问失败，请重试',
        icon: 'none',
        duration: 1800
      })
    })

  }

  toJzEditor() {
    Taro.navigateTo({
      url: '/pages/gypage/jz_editor?id=' + this.state.id + "&sn=" + this.state.d_sn + "&item=" + this.state.dataStr
    })
  }

  toDevice(id) {
    var item = {id: id};
    Taro.navigateTo({
      url: '/pages/gypage/device_detail?item=' + JSON.stringify(item)
    })
  }

  setCurrent(val) {
    // if(val==1&&this.state.jz_error_list.length==0)
    // {
    //   this.getErrorDeviceList()
    // }
    this.setState({
      current: val
    })
  }

  setCurrent_b(val) {
    if (val == 1 && this.state.jz_error_list.length == 0) {
      this.getErrorDeviceList()
    }
    this.setState({
      current_b: val
    })
  }

  getErrorDeviceList() {
    wx.showLoading({title: "加载中"})
    var databody = {
      access_token: this.props.gytoken.gytoken,
      wxid: this.props.sys_config.sets.wxid,
      S_d_sn: this.state.d_sn
    }
    this.wx_request(set.jz_error_list, databody, "POST", {'Content-Type': 'application/x-www-form-urlencoded'}).then((data) => {

      if (data.data.data.data) {
        this.setState({
          jz_error_list: data.data.data.data
        })
      }

      wx.hideLoading();

    }).catch((err) => {
      wx.hideLoading();
      wx.stopPullDownRefresh();
      wx.showToast({
        title: '网络访问失败，请重试',
        icon: 'none',
        duration: 1800
      })
    })

  }

  getGl() {
    wx.showLoading({title: "加载中"})
    var databody = {
      access_token: this.props.gytoken.gytoken,
      wxid: this.props.sys_config.sets.wxid,
      b_id: this.state.id
    }
    this.wx_request(set.get_last_kw, databody, "POST", {'Content-Type': 'application/x-www-form-urlencoded'}).then((res) => {


      this.setState({
        aca: res.data.data.aca,
        acv: res.data.data.acv,
        acw: res.data.data.ackw
      })
      wx.hideLoading();

    }).catch((err) => {
      wx.hideLoading();
      wx.stopPullDownRefresh();
      wx.showToast({
        title: '网络访问失败，请重试',
        icon: 'none',
        duration: 1800
      })
    })

  }

  toJzDeviceList(id) {
    Taro.navigateTo({
      url: '/pages/gypage/jz_device_list?id=' + this.state.id + "&sn=" + this.state.d_sn
    })
  }

  getDetail() {
    // wx.showLoading({title: "加载中"})
    var databody = {
      access_token: this.props.gytoken.gytoken,
      wxid: this.props.sys_config.sets.wxid,
      b_id: this.state.id
    }
    this.wx_request(set.get_jz_data, databody, "POST", {'Content-Type': 'application/x-www-form-urlencoded'}).then((data) => {
      //     wx.hideLoading()
      //   console.log(data)

      // var detail=data.data.data;
      //     console.log("detail",data.data.data)
      this.setState({
        data: data.data.data,
      }, () => {
        var title = this.state.detail && this.state.detail.name ? this.state.detail.name : ""
        var title_status = this.state.data.status == 1 ? "在线" : "断线"
        wx.setNavigationBarTitle({
          title: title + '--' + title_status
        })

      })
      //
      // wx.setNavigationBarTitle({
      //   title: detail.name
      // })


    }).catch((err) => {
      console.log(err)
      wx.hideLoading();
      wx.stopPullDownRefresh();
      wx.showToast({
        title: '网络访问失败，请重试',
        icon: 'none',
        duration: 1800
      })
    })

  }

  addDevice() {
    Taro.navigateTo({
      url: '/pages/gypage/add_devices?id=' + this.state.detail.id + "&sn=" + this.state.d_sn
    })
  }

  sendAt(item) {
    wx.showLoading({title: "加载中"})
    var databody = {
      access_token: this.props.gytoken.gytoken,
      wxid: this.props.sys_config.sets.wxid,
      b_id: this.state.id,
      code: item.code,
      atcmd: item.atcmd
    }
    this.wx_request(set.jz_send_at, databody, "POST", {'Content-Type': 'application/x-www-form-urlencoded'}).then((data) => {

      this.getDetail();
      wx.hideLoading();
      wx.showToast({
        title: "发送指令成功",
        icon: 'none',
        duration: 1800
      })


    }).catch((err) => {
      wx.hideLoading();
      wx.stopPullDownRefresh();
      console.log(err.data.msg)
      var msg = "网络访问失败，请重试";
      if (err.data && err.data.msg) {
        msg = err.data.msg
      }
      wx.showToast({
        title: msg,
        icon: 'none',
        duration: 1800
      })
    })

  }

  changeModel() {
    this.setState({
      showModel: !this.state.showModel
    }, () => {
      if (!this.state.showModel) {
        this.jzgetRangeList()
      }
    })
  }


  fetchData() {


    wx.showLoading({title: "加载中"})
    var databody = {
      access_token: this.props.gytoken.gytoken,
      wxid: this.props.sys_config.sets.wxid,
      id: this.state.id
    }
    this.wx_request(set.jz_sn, databody, "POST", {'Content-Type': 'application/x-www-form-urlencoded'}).then((data) => {

      console.log(data)
      this.setState({
        d_sn: data.data.data.d_sn
      }, () => {
        this.getDetail_b()
        //    this.getGl()

      })

    }).catch((err) => {
      wx.hideLoading();
      wx.stopPullDownRefresh();
      wx.showToast({
        title: '网络访问失败，请重试',
        icon: 'none',
        duration: 1800
      })
    })

  }

  jumCahrt(item)
  {
    console.log("点击了",item)
    item['b_id']=  this.state.id
    if(item.chart_type=="line"||item.chart_type=="bar")
    {
      Taro.navigateTo({
        url: '/pages/gypage/chartDetail?item='+JSON.stringify(item)
      })
    }
  }



  componentWillUnmount() {
    console.log("销定时器")
    clearInterval(intVal)
  }

  handleChangeName(val)
  {
    this.state.detail.name=val;
    this.setState({
      detail:this.state.detail
    })
  }

  render() {
    const {data, current, jz_normal_list, jz_error_list, detail, jzlist, showModel, airOption,homedata} = this.state;
    return (
      <View style={{
        flex: 1, backgroundImage: `url("http://wx.engconn.com/static/images-lp/bai.jpg")`,
        backgroundRepeat: "no-repeat",
        backgroundSize: "100% 100%",
      }}>

        <ScrollView>
          {current == 0 &&
          <View style={{display: "flex", flexDirection: "column", paddingBottom: "150rpx", minHeight: "100vh"}}>


            {showModel &&homedata && <View style={{
              flex: 1,
              width: "100%",
              display: "flex",
              flexDirection: "column",
              alignItems: "center",
            }}>
              {homedata && homedata.elec && homedata.elec.length>0&&homedata.elec[0].length>0 && homedata.elec.map((item)=>{return(

              <View
                // onClick={this.toDevice.bind(this, data.ac_data.id)}
                style={{
                  marginTop: "20px",
                  borderTop: "5px solid #37d267",
                  width: "96%",
                  height: "150rpx",
                  backgroundColor: "#ffffff",
                  borderBottomLeftRadius: "10px",
                  borderBottomRightRadius: "10px",
                  display: "flex",
                  position: "relative"
                }}>

                {/*<View style={{*/}
                {/*  position: "absolute",*/}
                {/*  right: "0px",*/}
                {/*  top: "0px",*/}
                {/*  width: "30px",*/}
                {/*  height: "26px",*/}
                {/*  backgroundImage: `url("https://wx.engconn.com/static/uploads/2020-02-17/259441581950166.jpg")`,*/}
                {/*  backgroundRepeat: "no-repeat",*/}
                {/*  backgroundSize: "100%",*/}
                {/*}}>*/}

                {/*</View>*/}
                <View style={{flex: 1, display: "flex"}}>
                  <View style={{flex: 1, display: "flex"}}>
                    <View style={{
                      width: "80rpx",
                      display: "flex",
                      alignItems: "center",
                      justifyContent: "center",
                      flexDirection: "column",
                      marginLeft: "10rpx"
                    }}>
                      <View style={{
                        width: "70rpx",
                        height: "70rpx",
                        borderRadius: "35rpx",
                        display: "flex",
                        alignItems: "center",
                        justifyContent: "center",
                        backgroundColor: "#cef6bb"
                      }}>
                        <Image src={"../../assets/images/d1.png"} style={{width: "35rpx", height: "35rpx"}}/>

                      </View>
                      <View>
                        <Text style={{fontSize: "20rpx", color: "#22ac38"}}>
                          配电箱
                        </Text>
                      </View>

                    </View>
                    <View style={{flex: 1, display: "flex"}}>
                      {item.map((s_item,key)=>{
                          return (<View key={key} onClick={this.jumCahrt.bind(this,s_item)} style={{
                            width:"25%",
                            display: "flex",
                            alignItems: "center",
                            justifyContent: "center",
                            flexDirection: "column",
                            borderRight: "1px solid #e0e0e0"
                          }}>
                            <View>
                              <Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>
                                {s_item.cn_name}
                              </Text>
                            </View>
                            <View>
                              <Text style={{fontSize: "22rpx", color: "#22ac38", fontWeight: "bold"}}>
                                {s_item.value}
                              </Text>
                            </View>

                          </View>)
                      })}




                      {/*<View*/}
                      {/*  style={{*/}
                      {/*  flex: 1,*/}
                      {/*  display: "flex",*/}
                      {/*  alignItems: "center",*/}
                      {/*  justifyContent: "center",*/}
                      {/*  flexDirection: "column",*/}
                      {/*  borderRight: "1px solid #e0e0e0"*/}
                      {/*}}>*/}
                      {/*  <View>*/}
                      {/*    <Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>*/}
                      {/*      交流电流*/}
                      {/*    </Text>*/}
                      {/*  </View>*/}
                      {/*  <View>*/}
                      {/*    <Text style={{fontSize: "22rpx", color: "#22ac38", fontWeight: "bold"}}>*/}
                      {/*      {data.ac_data.aca ? data.ac_data.aca : 0}A*/}
                      {/*    </Text>*/}
                      {/*  </View>*/}

                      {/*</View>*/}
                      {/*<View  style={{*/}
                      {/*  flex: 1,*/}
                      {/*  display: "flex",*/}
                      {/*  alignItems: "center",*/}
                      {/*  justifyContent: "center",*/}
                      {/*  flexDirection: "column",*/}
                      {/*  borderRight: "1px solid #e0e0e0"*/}
                      {/*}}>*/}
                      {/*  <View>*/}
                      {/*    <Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>*/}
                      {/*      总功率*/}
                      {/*    </Text>*/}
                      {/*  </View>*/}
                      {/*  <View>*/}
                      {/*    <Text style={{fontSize: "22rpx", color: "#22ac38", fontWeight: "bold"}}>*/}
                      {/*      {data.ac_data.ackw ? data.ac_data.ackw : 0}kW*/}
                      {/*    </Text>*/}
                      {/*  </View>*/}

                      {/*</View>*/}


                    </View>

                  </View>
                  {/*<View*/}
                  {/*  style={{*/}
                  {/*  width: "170rpx",*/}
                  {/*  display: "flex",*/}
                  {/*  alignItems: "center",*/}
                  {/*  justifyContent: "center",*/}
                  {/*  flexDirection: "column",*/}
                  {/*  zIndex: 2*/}
                  {/*}}>*/}
                  {/*  <View>*/}
                  {/*    <Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>*/}
                  {/*      总电量*/}
                  {/*    </Text>*/}
                  {/*  </View>*/}
                  {/*  <View>*/}
                  {/*    <Text style={{fontSize: "22rpx", color: "#22ac38", fontWeight: "bold"}}>*/}
                  {/*      {data.ac_data.acec ? data.ac_data.acec : 0}kWh*/}
                  {/*    </Text>*/}
                  {/*  </View>*/}
                  {/*</View>*/}
                </View>


              </View>)})}
              {/*{data && data.dc_box && <View*/}
                {/*//   onClick={this.toDevice.bind(this, data.dc_box.id)}*/}
                {/*style={{*/}
                  {/*marginTop: "20px",*/}
                  {/*borderTop: "5px solid #37d267",*/}
                  {/*width: "96%",*/}
                  {/*height: "150rpx",*/}
                  {/*backgroundColor: "#ffffff",*/}
                  {/*borderBottomLeftRadius: "10px",*/}
                  {/*borderBottomRightRadius: "10px",*/}
                  {/*display: "flex",*/}
                  {/*position: "relative"*/}
                {/*}}>*/}

                {/*<View style={{*/}
                  {/*position: "absolute",*/}
                  {/*right: "0px",*/}
                  {/*top: "0px",*/}
                  {/*width: "30px",*/}
                  {/*height: "26px",*/}
                  {/*backgroundImage: `url("https://wx.engconn.com/static/uploads/2020-02-17/259441581950166.jpg")`,*/}
                  {/*backgroundRepeat: "no-repeat",*/}
                  {/*backgroundSize: "100%",*/}
                {/*}}>*/}

                {/*</View>*/}
                {/*<View style={{flex: 1, display: "flex"}}>*/}
                  {/*<View style={{flex: 1, display: "flex"}}>*/}
                    {/*<View style={{*/}
                      {/*width: "80rpx",*/}
                      {/*display: "flex",*/}
                      {/*alignItems: "center",*/}
                      {/*justifyContent: "center",*/}
                      {/*flexDirection: "column",*/}
                      {/*marginLeft: "10rpx"*/}
                    {/*}}>*/}
                      {/*<View style={{*/}
                        {/*width: "70rpx",*/}
                        {/*height: "70rpx",*/}
                        {/*borderRadius: "35rpx",*/}
                        {/*display: "flex",*/}
                        {/*alignItems: "center",*/}
                        {/*justifyContent: "center",*/}
                        {/*backgroundColor: "#cef6bb"*/}
                      {/*}}>*/}
                        {/*<Image src={"../../assets/images/d2.png"} style={{width: "35rpx", height: "35rpx"}}/>*/}

                      {/*</View>*/}
                      {/*<View>*/}
                        {/*<Text style={{fontSize: "20rpx", color: "#22ac38"}}>*/}
                          {/*直流屏*/}
                        {/*</Text>*/}
                      {/*</View>*/}

                    {/*</View>*/}
                    {/*<View style={{flex: 1, display: "flex"}}>*/}
                      {/*<View style={{*/}
                        {/*flex: 1,*/}
                        {/*display: "flex",*/}
                        {/*alignItems: "center",*/}
                        {/*justifyContent: "center",*/}
                        {/*flexDirection: "column",*/}
                        {/*borderRight: "1px solid #e0e0e0"*/}
                      {/*}}>*/}
                        {/*<View>*/}
                          {/*<Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>*/}
                            {/*直流电压*/}
                          {/*</Text>*/}
                        {/*</View>*/}
                        {/*<View>*/}
                          {/*<Text style={{fontSize: "22rpx", color: "#22ac38", fontWeight: "bold"}}>*/}
                            {/*{data.dc_box.dcv ? data.dc_box.dcv : 0}V*/}
                          {/*</Text>*/}
                        {/*</View>*/}

                      {/*</View>*/}
                      {/*<View style={{*/}
                        {/*flex: 1,*/}
                        {/*display: "flex",*/}
                        {/*alignItems: "center",*/}
                        {/*justifyContent: "center",*/}
                        {/*flexDirection: "column",*/}
                        {/*borderRight: "1px solid #e0e0e0"*/}
                      {/*}}>*/}
                        {/*<View>*/}
                          {/*<Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>*/}
                            {/*直流电流*/}
                          {/*</Text>*/}
                        {/*</View>*/}
                        {/*<View>*/}
                          {/*<Text style={{fontSize: "22rpx", color: "#22ac38", fontWeight: "bold"}}>*/}
                            {/*{data.dc_box.dca ? data.dc_box.dca : 0}A*/}
                          {/*</Text>*/}
                        {/*</View>*/}

                      {/*</View>*/}
                      {/*<View style={{*/}
                        {/*flex: 1,*/}
                        {/*display: "flex",*/}
                        {/*alignItems: "center",*/}
                        {/*justifyContent: "center",*/}
                        {/*flexDirection: "column",*/}
                        {/*borderRight: "1px solid #e0e0e0"*/}
                      {/*}}>*/}
                        {/*<View>*/}
                          {/*<Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>*/}
                            {/*电池充电电流*/}
                          {/*</Text>*/}
                        {/*</View>*/}
                        {/*<View>*/}
                          {/*<Text style={{fontSize: "22rpx", color: "#22ac38", fontWeight: "bold"}}>*/}
                            {/*{data.dc_box.dcbca ? data.dc_box.dcbca : 0}A*/}
                          {/*</Text>*/}
                        {/*</View>*/}

                      {/*</View>*/}


                    {/*</View>*/}

                  {/*</View>*/}
                  {/*<View style={{*/}
                    {/*width: "170rpx",*/}
                    {/*display: "flex",*/}
                    {/*alignItems: "center",*/}
                    {/*justifyContent: "center",*/}
                    {/*flexDirection: "column",*/}
                    {/*zIndex: 2*/}
                  {/*}}>*/}
                    {/*<View>*/}
                      {/*<Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>*/}

                      {/*</Text>*/}
                    {/*</View>*/}
                    {/*<View>*/}
                      {/*<Text style={{fontSize: "22rpx", color: "#22ac38", fontWeight: "bold"}}>*/}

                      {/*</Text>*/}
                    {/*</View>*/}
                  {/*</View>*/}


                {/*</View>*/}


              {/*</View>}*/}
              {homedata&&homedata.temp&& homedata.temp.length>0&&homedata.temp[0].length>0 &&homedata.temp.map((item,k)=>{
                return(<View style={{
                  marginTop: "20px",
                  borderTop: "5px solid #37d267",
                  width: "96%",
                  height: "150rpx",
                  backgroundColor: "#ffffff",
                  borderBottomLeftRadius: "10px",
                  borderBottomRightRadius: "10px",
                  display: "flex",
                  position: "relative"
                }}>

                  <View style={{flex: 1, display: "flex"}}>

                    <View style={{flex: 1, display: "flex"}}>
                      <View style={{
                        width: "80rpx",
                        display: "flex",
                        alignItems: "center",
                        justifyContent: "center",
                        flexDirection: "column",
                        marginLeft: "10rpx"
                      }}>
                        <View style={{
                          width: "70rpx",
                          height: "70rpx",
                          borderRadius: "35rpx",
                          display: "flex",
                          alignItems: "center",
                          justifyContent: "center",
                          backgroundColor: "#cef6bb"
                        }}>
                          <Image src={"../../assets/images/d3.png"} style={{width: "35rpx", height: "35rpx"}}/>

                        </View>
                        <View>
                          <Text style={{fontSize: "20rpx", color: "#22ac38"}}>
                            温湿度
                          </Text>
                        </View>

                      </View>
                      <View style={{flex: 1, display: "flex"}}>
                          {item.map((s_item,key)=>{
                          return(<View key={key+"temp"} onClick={this.jumCahrt.bind(this,s_item)} style={{
                            width:"25%",
                            display: "flex",
                            alignItems: "center",
                            justifyContent: "center",
                            flexDirection: "column",
                            borderRight: "1px solid #e0e0e0"
                          }}>
                            <View>
                              <Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>
                                {s_item.cn_name}
                              </Text>
                            </View>
                            <View>
                              <Text style={{fontSize: "22rpx", color: "#22ac38", fontWeight: "bold"}}>
                                {s_item.value}
                              </Text>
                            </View>

                          </View>)
                        })}


                        {/*<View style={{*/}
                        {/*  flex: 1,*/}
                        {/*  display: "flex",*/}
                        {/*  alignItems: "center",*/}
                        {/*  justifyContent: "center",*/}
                        {/*  flexDirection: "column",*/}
                        {/*  borderRight: "1px solid #e0e0e0"*/}
                        {/*}}>*/}
                        {/*  <View>*/}
                        {/*    <Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>*/}
                        {/*      回风温度*/}
                        {/*    </Text>*/}
                        {/*  </View>*/}
                        {/*  <View>*/}
                        {/*    <Text style={{fontSize: "22rpx", color: "#22ac38", fontWeight: "bold"}}>*/}
                        {/*      {data.ambt.snwd_2 ? data.ambt.snwd_2 : 0}℃*/}
                        {/*    </Text>*/}
                        {/*  </View>*/}

                        {/*</View>*/}
                        {/*<View style={{*/}
                        {/*  flex: 1,*/}
                        {/*  display: "flex",*/}
                        {/*  alignItems: "center",*/}
                        {/*  justifyContent: "center",*/}
                        {/*  flexDirection: "column",*/}
                        {/*  borderRight: "1px solid #e0e0e0"*/}
                        {/*}}>*/}
                        {/*  <View>*/}
                        {/*    <Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>*/}
                        {/*      室外温度*/}
                        {/*    </Text>*/}
                        {/*  </View>*/}
                        {/*  <View>*/}
                        {/*    <Text style={{fontSize: "22rpx", color: "#22ac38", fontWeight: "bold"}}>*/}
                        {/*      {data.ambt.swwd_1 ? data.ambt.swwd_1 : 0}℃*/}
                        {/*    </Text>*/}
                        {/*  </View>*/}

                        {/*</View>*/}


                      </View>

                    </View>
                    {/*<View style={{*/}
                    {/*  width: "170rpx",*/}
                    {/*  display: "flex",*/}
                    {/*  alignItems: "center",*/}
                    {/*  justifyContent: "center",*/}
                    {/*  flexDirection: "column",*/}
                    {/*  zIndex: 2*/}
                    {/*}}>*/}
                    {/*  <View>*/}
                    {/*    {(detail.dev_type&&detail.dev_type!=0)?<Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>*/}
                    {/*      湿度*/}
                    {/*    </Text>:<Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>*/}
                    {/*      冷质温度*/}
                    {/*    </Text>}*/}
                    {/*  </View>*/}
                    {/*  <View>*/}
                    {/*    {detail.dev_type&&detail.dev_type!=0?<Text style={{fontSize: "22rpx", color: "#22ac38", fontWeight: "bold"}}>*/}
                    {/*      {data.ambt.wswd ? data.ambt.wswd : 0}%*/}
                    {/*    </Text>:<Text style={{fontSize: "22rpx", color: "#22ac38", fontWeight: "bold"}}>*/}
                    {/*      {data.ambt.wswd ? data.ambt.wswd : 0}℃*/}
                    {/*    </Text>}*/}
                    {/*  </View>*/}
                    {/*</View>*/}


                  </View>


                </View>)
              }) }
              {homedata&&homedata.air && homedata.air.length>0&&homedata.air[0].length>0 &&homedata.air.map((item,k)=>{
                return(<View style={{
                  marginTop: "20px",
                  borderTop: "5px solid #37d267",
                  width: "96%",
                  height: "150rpx",
                  backgroundColor: "#ffffff",
                  borderBottomLeftRadius: "10px",
                  borderBottomRightRadius: "10px",
                  display: "flex",
                  position: "relative"
                }}>

                  <View style={{flex: 1, display: "flex"}}>

                    <View style={{flex: 1, display: "flex"}}>
                      <View style={{
                        width: "80rpx",
                        display: "flex",
                        alignItems: "center",
                        justifyContent: "center",
                        flexDirection: "column",
                        marginLeft: "10rpx"
                      }}>
                        <View style={{
                          width: "70rpx",
                          height: "70rpx",
                          borderRadius: "35rpx",
                          display: "flex",
                          alignItems: "center",
                          justifyContent: "center",
                          backgroundColor: "#cef6bb"
                        }}>
                          <Image src={"../../assets/images/d4.png"} style={{width: "35rpx", height: "35rpx"}}/>

                        </View>
                        <View>
                          <Text style={{fontSize: "20rpx", color: "#22ac38"}}>
                            空调
                          </Text>
                        </View>

                      </View>
                      <View style={{flex: 1, display: "flex"}}>
                        {item.map((s_item,key)=>{
                          return(<View key={key+"air"} onClick={this.jumCahrt.bind(this,s_item)} style={{
                            width:"25%",
                            display: "flex",
                            alignItems: "center",
                            justifyContent: "center",
                            flexDirection: "column",
                            borderRight: "1px solid #e0e0e0"
                          }}>
                            <View>
                              <Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>
                                {s_item.cn_name}
                              </Text>
                            </View>
                            <View>

                                <View style={{
                                  height: "36rpx",
                                  width: "100rpx",
                                  backgroundColor: s_item.value == "0" ?  "#e0e0e0":"#80c269",
                                  display: "flex",
                                  borderRadius: "18rpx",
                                  alignItems: "center",
                                  justifyContent: "center"
                                }}>
                                  <Text style={{fontSize: "22rpx", color: "#ffffff", fontWeight: "bold"}}>
                                    {s_item.value == "0"?"关":"开"}
                                  </Text>
                                </View>
                            </View>

                          </View>)
                        })}


                        {/*<View style={{*/}
                        {/*  flex: 1,*/}
                        {/*  display: "flex",*/}
                        {/*  alignItems: "center",*/}
                        {/*  justifyContent: "center",*/}
                        {/*  flexDirection: "column",*/}
                        {/*  borderRight: "1px solid #e0e0e0"*/}
                        {/*}}>*/}
                        {/*  <View>*/}
                        {/*    <Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>*/}
                        {/*      回风温度*/}
                        {/*    </Text>*/}
                        {/*  </View>*/}
                        {/*  <View>*/}
                        {/*    <Text style={{fontSize: "22rpx", color: "#22ac38", fontWeight: "bold"}}>*/}
                        {/*      {data.ambt.snwd_2 ? data.ambt.snwd_2 : 0}℃*/}
                        {/*    </Text>*/}
                        {/*  </View>*/}

                        {/*</View>*/}
                        {/*<View style={{*/}
                        {/*  flex: 1,*/}
                        {/*  display: "flex",*/}
                        {/*  alignItems: "center",*/}
                        {/*  justifyContent: "center",*/}
                        {/*  flexDirection: "column",*/}
                        {/*  borderRight: "1px solid #e0e0e0"*/}
                        {/*}}>*/}
                        {/*  <View>*/}
                        {/*    <Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>*/}
                        {/*      室外温度*/}
                        {/*    </Text>*/}
                        {/*  </View>*/}
                        {/*  <View>*/}
                        {/*    <Text style={{fontSize: "22rpx", color: "#22ac38", fontWeight: "bold"}}>*/}
                        {/*      {data.ambt.swwd_1 ? data.ambt.swwd_1 : 0}℃*/}
                        {/*    </Text>*/}
                        {/*  </View>*/}

                        {/*</View>*/}


                      </View>

                    </View>
                    {/*<View style={{*/}
                    {/*  width: "170rpx",*/}
                    {/*  display: "flex",*/}
                    {/*  alignItems: "center",*/}
                    {/*  justifyContent: "center",*/}
                    {/*  flexDirection: "column",*/}
                    {/*  zIndex: 2*/}
                    {/*}}>*/}
                    {/*  <View>*/}
                    {/*    {(detail.dev_type&&detail.dev_type!=0)?<Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>*/}
                    {/*      湿度*/}
                    {/*    </Text>:<Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>*/}
                    {/*      冷质温度*/}
                    {/*    </Text>}*/}
                    {/*  </View>*/}
                    {/*  <View>*/}
                    {/*    {detail.dev_type&&detail.dev_type!=0?<Text style={{fontSize: "22rpx", color: "#22ac38", fontWeight: "bold"}}>*/}
                    {/*      {data.ambt.wswd ? data.ambt.wswd : 0}%*/}
                    {/*    </Text>:<Text style={{fontSize: "22rpx", color: "#22ac38", fontWeight: "bold"}}>*/}
                    {/*      {data.ambt.wswd ? data.ambt.wswd : 0}℃*/}
                    {/*    </Text>}*/}
                    {/*  </View>*/}
                    {/*</View>*/}


                  </View>


                </View>)
              }) }
              {homedata&&homedata.pan &&homedata.pan.length>0 &&homedata.pan[0].length>0 &&homedata.pan.map((item,k)=>{
                return(<View style={{
                  marginTop: "20px",
                  borderTop: "5px solid #37d267",
                  width: "96%",
                  height: "150rpx",
                  backgroundColor: "#ffffff",
                  borderBottomLeftRadius: "10px",
                  borderBottomRightRadius: "10px",
                  display: "flex",
                  position: "relative"
                }}>

                  <View style={{flex: 1, display: "flex"}}>

                    <View style={{flex: 1, display: "flex"}}>
                      <View style={{
                        width: "80rpx",
                        display: "flex",
                        alignItems: "center",
                        justifyContent: "center",
                        flexDirection: "column",
                        marginLeft: "10rpx"
                      }}>
                        <View style={{
                          width: "70rpx",
                          height: "70rpx",
                          borderRadius: "35rpx",
                          display: "flex",
                          alignItems: "center",
                          justifyContent: "center",
                          backgroundColor: "#cef6bb"
                        }}>
                          <Image src={"../../assets/images/d5.png"} style={{width: "35rpx", height: "35rpx"}}/>

                        </View>
                        <View>
                          <Text style={{fontSize: "20rpx", color: "#22ac38"}}>
                            风机
                          </Text>
                        </View>

                      </View>
                      <View style={{flex: 1, display: "flex"}}>
                        {item.map((s_item,key)=>{
                          return(<View key={key+"temp"} onClick={this.jumCahrt.bind(this,s_item)} style={{
                            width:"25%",
                            display: "flex",
                            alignItems: "center",
                            justifyContent: "center",
                            flexDirection: "column",
                            borderRight: "1px solid #e0e0e0"
                          }}>
                            <View>
                              <Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>
                                {s_item.cn_name}
                              </Text>
                            </View>
                            <View>
                              <View style={{
                                height: "36rpx",
                                width: "100rpx",
                                backgroundColor: s_item.value > "0" ?  "#80c269":"#e0e0e0",
                                display: "flex",
                                borderRadius: "18rpx",
                                alignItems: "center",
                                justifyContent: "center"
                              }}>
                                <Text style={{fontSize: "22rpx", color: "#ffffff", fontWeight: "bold"}}>
                                  {s_item.value==0?"关":s_item.value}
                                </Text>
                              </View>
                            </View>

                          </View>)
                        })}


                        {/*<View style={{*/}
                        {/*  flex: 1,*/}
                        {/*  display: "flex",*/}
                        {/*  alignItems: "center",*/}
                        {/*  justifyContent: "center",*/}
                        {/*  flexDirection: "column",*/}
                        {/*  borderRight: "1px solid #e0e0e0"*/}
                        {/*}}>*/}
                        {/*  <View>*/}
                        {/*    <Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>*/}
                        {/*      回风温度*/}
                        {/*    </Text>*/}
                        {/*  </View>*/}
                        {/*  <View>*/}
                        {/*    <Text style={{fontSize: "22rpx", color: "#22ac38", fontWeight: "bold"}}>*/}
                        {/*      {data.ambt.snwd_2 ? data.ambt.snwd_2 : 0}℃*/}
                        {/*    </Text>*/}
                        {/*  </View>*/}

                        {/*</View>*/}
                        {/*<View style={{*/}
                        {/*  flex: 1,*/}
                        {/*  display: "flex",*/}
                        {/*  alignItems: "center",*/}
                        {/*  justifyContent: "center",*/}
                        {/*  flexDirection: "column",*/}
                        {/*  borderRight: "1px solid #e0e0e0"*/}
                        {/*}}>*/}
                        {/*  <View>*/}
                        {/*    <Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>*/}
                        {/*      室外温度*/}
                        {/*    </Text>*/}
                        {/*  </View>*/}
                        {/*  <View>*/}
                        {/*    <Text style={{fontSize: "22rpx", color: "#22ac38", fontWeight: "bold"}}>*/}
                        {/*      {data.ambt.swwd_1 ? data.ambt.swwd_1 : 0}℃*/}
                        {/*    </Text>*/}
                        {/*  </View>*/}

                        {/*</View>*/}


                      </View>

                    </View>
                    {/*<View style={{*/}
                    {/*  width: "170rpx",*/}
                    {/*  display: "flex",*/}
                    {/*  alignItems: "center",*/}
                    {/*  justifyContent: "center",*/}
                    {/*  flexDirection: "column",*/}
                    {/*  zIndex: 2*/}
                    {/*}}>*/}
                    {/*  <View>*/}
                    {/*    {(detail.dev_type&&detail.dev_type!=0)?<Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>*/}
                    {/*      湿度*/}
                    {/*    </Text>:<Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>*/}
                    {/*      冷质温度*/}
                    {/*    </Text>}*/}
                    {/*  </View>*/}
                    {/*  <View>*/}
                    {/*    {detail.dev_type&&detail.dev_type!=0?<Text style={{fontSize: "22rpx", color: "#22ac38", fontWeight: "bold"}}>*/}
                    {/*      {data.ambt.wswd ? data.ambt.wswd : 0}%*/}
                    {/*    </Text>:<Text style={{fontSize: "22rpx", color: "#22ac38", fontWeight: "bold"}}>*/}
                    {/*      {data.ambt.wswd ? data.ambt.wswd : 0}℃*/}
                    {/*    </Text>}*/}
                    {/*  </View>*/}
                    {/*</View>*/}


                  </View>


                </View>)
              }) }
              {/*{data && data.air_status && data.air_status.length > 0 &&*/}
              {/*<View style={{*/}
              {/*    overflow: "hidden",*/}
              {/*    marginTop: "20px",*/}
              {/*    borderTop: "5px solid #37d267",*/}
              {/*    width: "96%",*/}
              {/*    height: "150rpx",*/}
              {/*    backgroundColor: "#ffffff",*/}
              {/*    borderBottomLeftRadius: "10px",*/}
              {/*    borderBottomRightRadius: "10px",*/}
              {/*    display: "flex",*/}
              {/*    position: "relative"*/}
              {/*  }}>*/}

              {/*  <View style={{flex: 1, display: "flex"}}>*/}
              {/*    <View style={{flex: 1, display: "flex"}}>*/}
              {/*      <View style={{*/}
              {/*        width: "80rpx",*/}
              {/*        display: "flex",*/}
              {/*        alignItems: "center",*/}
              {/*        justifyContent: "center",*/}
              {/*        flexDirection: "column",*/}
              {/*        marginLeft: "10rpx"*/}
              {/*      }}>*/}
              {/*        <View style={{*/}
              {/*          width: "70rpx",*/}
              {/*          height: "70rpx",*/}
              {/*          borderRadius: "35rpx",*/}
              {/*          display: "flex",*/}
              {/*          alignItems: "center",*/}
              {/*          justifyContent: "center",*/}
              {/*          backgroundColor: "#cef6bb"*/}
              {/*        }}>*/}
              {/*          <Image src={"../../assets/images/d4.png"} style={{width: "35rpx", height: "35rpx"}}/>*/}

              {/*        </View>*/}
              {/*        <View>*/}
              {/*          <Text style={{fontSize: "20rpx", color: "#22ac38"}}>*/}
              {/*            空调*/}
              {/*          </Text>*/}
              {/*        </View>*/}

              {/*      </View>*/}
              {/*      {data.air_status.map((item, key) => {*/}
              {/*        return (<View key={key}*/}
              {/*                      style={{width: "170rpx", display: "flex"}}>*/}
              {/*          <View*/}
              {/*            style={{*/}
              {/*              flex: 1,*/}
              {/*              display: "flex",*/}
              {/*              alignItems: "center",*/}
              {/*              justifyContent: "center",*/}
              {/*              flexDirection: "column",*/}
              {/*              borderRight: key != data.air_status.length - 1 ? "1px solid #e0e0e0" : "none"*/}
              {/*            }}>*/}
              {/*            <View>*/}
              {/*              <Text style={{*/}
              {/*                fontSize: "24rpx",*/}
              {/*                color: "#767676",*/}
              {/*                fontWeight: "bold"*/}
              {/*              }}>*/}
              {/*                {item.name}*/}
              {/*              </Text>*/}
              {/*            </View>*/}

              {/*            <View style={{marginTop: "10rpx"}}>*/}

              {/*              <View style={{*/}
              {/*                height: "36rpx",*/}
              {/*                width: "100rpx",*/}
              {/*                backgroundColor: item.run_status == "未运行" ? "#e0e0e0" : "#80c269",*/}
              {/*                display: "flex",*/}
              {/*                borderRadius: "18rpx",*/}
              {/*                alignItems: "center",*/}
              {/*                justifyContent: "center"*/}
              {/*              }}>*/}
              {/*                <Text style={{fontSize: "22rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*                  {item.run_status}*/}
              {/*                </Text>*/}
              {/*              </View>*/}

              {/*            </View>*/}


              {/*          </View>*/}

              {/*        </View>)*/}
              {/*      })}*/}


              {/*    </View>*/}


              {/*  </View>*/}


              {/*</View>}*/}

              {/*{*/}
              {/*  data && data.fan_status && data.fan_status.length > 0 &&*/}
              {/*<View*/}
              {/*  style={{*/}
              {/*    overflow: "hidden",*/}
              {/*    marginTop: "20px",*/}
              {/*    borderTop: "5px solid #37d267",*/}
              {/*    width: "96%",*/}
              {/*    height: "150rpx",*/}
              {/*    backgroundColor: "#ffffff",*/}
              {/*    borderBottomLeftRadius: "10px",*/}
              {/*    borderBottomRightRadius: "10px",*/}
              {/*    display: "flex",*/}
              {/*    position: "relative"*/}
              {/*  }}>*/}

              {/*  <View style={{flex: 1, display: "flex"}}>*/}
              {/*    <View style={{flex: 1, display: "flex"}}>*/}
              {/*      <View style={{*/}
              {/*        width: "80rpx",*/}
              {/*        display: "flex",*/}
              {/*        alignItems: "center",*/}
              {/*        justifyContent: "center",*/}
              {/*        flexDirection: "column",*/}
              {/*        marginLeft: "10rpx"*/}
              {/*      }}>*/}
              {/*        <View style={{*/}
              {/*          width: "70rpx",*/}
              {/*          height: "70rpx",*/}
              {/*          borderRadius: "35rpx",*/}
              {/*          display: "flex",*/}
              {/*          alignItems: "center",*/}
              {/*          justifyContent: "center",*/}
              {/*          backgroundColor: "#cef6bb"*/}
              {/*        }}>*/}
              {/*          <Image src={"../../assets/images/d5.png"} style={{width: "35rpx", height: "35rpx"}}/>*/}

              {/*        </View>*/}
              {/*        <View>*/}
              {/*          <Text style={{fontSize: "20rpx", color: "#22ac38"}}>*/}
              {/*            风机*/}
              {/*          </Text>*/}
              {/*        </View>*/}

              {/*      </View>*/}
              {/*      {data.fan_status.map((item, key) => {*/}
              {/*        return (<View key={key}*/}
              {/*                      style={{width: "170rpx", display: "flex"}}>*/}
              {/*          <View*/}
              {/*            style={{*/}
              {/*              flex: 1,*/}
              {/*              display: "flex",*/}
              {/*              alignItems: "center",*/}
              {/*              justifyContent: "center",*/}
              {/*              flexDirection: "column",*/}
              {/*              borderRight: key != data.air_status.length - 1 ? "1px solid #e0e0e0" : "none"*/}
              {/*            }}>*/}
              {/*            <View>*/}
              {/*              <Text style={{*/}
              {/*                fontSize: "24rpx",*/}
              {/*                color: "#767676",*/}
              {/*                fontWeight: "bold"*/}
              {/*              }}>*/}
              {/*                {item.name}*/}
              {/*              </Text>*/}
              {/*            </View>*/}

              {/*            <View style={{marginTop: "10rpx"}}>*/}

              {/*              <View style={{*/}
              {/*                height: "36rpx",*/}
              {/*                width: "100rpx",*/}
              {/*                backgroundColor: item.run_status == "未运行" ? "#e0e0e0" : "#80c269",*/}
              {/*                display: "flex",*/}
              {/*                borderRadius: "18rpx",*/}
              {/*                alignItems: "center",*/}
              {/*                justifyContent: "center"*/}
              {/*              }}>*/}
              {/*                <Text style={{fontSize: "22rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*                  {item.run_status}*/}
              {/*                </Text>*/}
              {/*              </View>*/}

              {/*            </View>*/}


              {/*          </View>*/}

              {/*        </View>)*/}
              {/*      })}*/}


              {/*    </View>*/}


              {/*  </View>*/}


              {/*</View>}*/}


              {/*{data && data.air &&*/}
              {/*<View*/}
              {/**/}
              {/*style={{*/}
              {/*overflow: "hidden",*/}
              {/*marginTop: "20px",*/}
              {/*borderTop: "5px solid #37d267",*/}
              {/*width: "96%",*/}
              {/*height: "150rpx",*/}
              {/*backgroundColor: "#ffffff",*/}
              {/*borderBottomLeftRadius: "10px",*/}
              {/*borderBottomRightRadius: "10px",*/}
              {/*display: "flex",*/}
              {/*position: "relative"*/}
              {/*}}>*/}

              {/*<View style={{flex: 1, display: "flex"}}>*/}
              {/*<View style={{flex: 1, display: "flex"}}>*/}
              {/*<View style={{*/}
              {/*width: "80rpx",*/}
              {/*display: "flex",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center",*/}
              {/*flexDirection: "column",*/}
              {/*marginLeft: "10rpx"*/}
              {/*}}>*/}
              {/*<View style={{*/}
              {/*width: "70rpx",*/}
              {/*height: "70rpx",*/}
              {/*borderRadius: "35rpx",*/}
              {/*display: "flex",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center",*/}
              {/*backgroundColor: "#cef6bb"*/}
              {/*}}>*/}
              {/*<Image src={"../../assets/images/d4.png"} style={{width: "35rpx", height: "35rpx"}}/>*/}

              {/*</View>*/}
              {/*<View>*/}
              {/*<Text style={{fontSize: "20rpx", color: "#22ac38"}}>*/}
              {/*空调*/}
              {/*</Text>*/}
              {/*</View>*/}

              {/*</View>*/}
              {/*<View style={{flex: 1, display: "flex"}}>*/}
              {/*{data.air && data.air.air_status_1 == 0 && data.air.air_attr_1.name&&*/}
              {/*<View style={{flex:1,display:"flex"}}>*/}
              {/*{data.air && data.air.air_status_1 == 0 ?*/}
              {/*<View*/}
              {/*style={data.air.air_attr_1.is_run ? {*/}
              {/*flex: 1,*/}
              {/*display: "flex",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center",*/}
              {/*flexDirection: "column",*/}
              {/*borderRight: "1px solid #e0e0e0",*/}
              {/*background: "#4594ff",*/}
              {/*backgroundImage: `url("../../assets/images/xue.png")`,*/}
              {/*backgroundRepeat: "no-repeat",*/}
              {/*backgroundSize: "100% 100%"*/}
              {/*} : {*/}
              {/*flex: 1,*/}
              {/*display: "flex",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center",*/}
              {/*flexDirection: "column",*/}
              {/*borderRight: "1px solid #e0e0e0"*/}
              {/*}}>*/}
              {/*<View>*/}
              {/*<Text style={{*/}
              {/*fontSize: "24rpx",*/}
              {/*color: data.air.air_attr_1.is_run ? "#ffffff" : "#767676",*/}
              {/*fontWeight: "bold"*/}
              {/*}}>*/}
              {/*空调1*/}
              {/*</Text>*/}
              {/*</View>*/}
              {/*{data.status == 1 ?*/}
              {/*<View style={{marginTop: "10rpx"}}>*/}
              {/*{data.air && data.air.air_attr_1 && data.air && data.air.air_attr_1.is_check ?*/}
              {/*<View onClick={this.sendAt.bind(this, data.air.air_attr_1)} style={{*/}
              {/*height: "36rpx",*/}
              {/*width: "100rpx",*/}
              {/*backgroundColor: "#aa89bd",*/}
              {/*display: "flex",*/}
              {/*borderRadius: "18rpx",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center"*/}
              {/*}}>*/}
              {/*<Text style={{fontSize: "22rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*{data.air && data.air.air_attr_1 ? data.air.air_attr_1.name : ""}*/}
              {/*</Text>*/}
              {/*</View>*/}
              {/*:*/}
              {/*<View onClick={this.sendAt.bind(this, data.air.air_attr_1)} style={{*/}
              {/*height: "36rpx",*/}
              {/*width: "100rpx",*/}
              {/*backgroundColor: "#80c269",*/}
              {/*display: "flex",*/}
              {/*borderRadius: "18rpx",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center"*/}
              {/*}}>*/}
              {/*<Text style={{fontSize: "22rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*{data.air && data.air.air_attr_1 ? data.air.air_attr_1.name : ""}*/}
              {/*</Text>*/}
              {/*</View>}*/}

              {/*</View>*/}
              {/*:*/}
              {/*<View style={{marginTop: "10rpx"}}>*/}

              {/*<View style={{*/}
              {/*height: "36rpx",*/}
              {/*width: "100rpx",*/}
              {/*backgroundColor: "#ececec",*/}
              {/*display: "flex",*/}
              {/*borderRadius: "18rpx",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center"*/}
              {/*}}>*/}
              {/*<Text style={{fontSize: "22rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*{data.air && data.air.air_attr_1 ? data.air.air_attr_1.name : ""}*/}
              {/*</Text>*/}
              {/*</View>*/}

              {/*</View>*/}
              {/*}*/}

              {/*</View>*/}
              {/*:*/}
              {/*<View*/}
              {/*style={{*/}
              {/*flex: 1,*/}
              {/*display: "flex",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center",*/}
              {/*flexDirection: "column",*/}
              {/*borderRight: "1px solid #e0e0e0",*/}
              {/*backgroundColor: "#eb6877"*/}
              {/*}}>*/}
              {/*<View>*/}
              {/*<Text style={{fontSize: "24rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*空调1*/}
              {/*</Text>*/}
              {/*</View>*/}
              {/*<View>*/}
              {/*<Text style={{fontSize: "22rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*故障*/}
              {/*</Text>*/}
              {/*</View>*/}

              {/*</View>*/}
              {/*}*/}
              {/*</View>}*/}
              {/*{data.air && data.air.air_status_2 == 0 && data.air.air_attr_2.name&&*/}
              {/*<View style={{flex:1,display:"flex"}}>*/}
              {/*{data.air && data.air.air_status_2 == 0 ?*/}
              {/*<View*/}
              {/*style={data.air.air_attr_2.is_run ? {*/}
              {/*flex: 1,*/}
              {/*display: "flex",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center",*/}
              {/*flexDirection: "column",*/}
              {/*borderRight: "1px solid #e0e0e0",*/}
              {/*background: "#4594ff",*/}
              {/*backgroundImage: `url("../../assets/images/xue.png")`,*/}
              {/*backgroundRepeat: "no-repeat",*/}
              {/*backgroundSize: "100% 100%"*/}
              {/*} : {*/}
              {/*flex: 1,*/}
              {/*display: "flex",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center",*/}
              {/*flexDirection: "column",*/}
              {/*borderRight: "1px solid #e0e0e0"*/}
              {/*}}>*/}
              {/*<View>*/}
              {/*<Text style={{*/}
              {/*fontSize: "24rpx",*/}
              {/*color: data.air.air_attr_2.is_run ? "#ffffff" : "#767676",*/}
              {/*fontWeight: "bold"*/}
              {/*}}>*/}
              {/*空调2*/}
              {/*</Text>*/}
              {/*</View>*/}
              {/*{data.status == 1 ?*/}
              {/*<View style={{marginTop: "10rpx"}}>*/}
              {/*{data.air && data.air.air_attr_2 && data.air && data.air.air_attr_2.is_check ?*/}
              {/*<View onClick={this.sendAt.bind(this, data.air.air_attr_2)} style={{*/}
              {/*height: "36rpx",*/}
              {/*width: "100rpx",*/}
              {/*backgroundColor: "#aa89bd",*/}
              {/*display: "flex",*/}
              {/*borderRadius: "18rpx",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center"*/}
              {/*}}>*/}
              {/*<Text style={{fontSize: "22rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*{data.air && data.air.air_attr_2 ? data.air.air_attr_2.name : ""}*/}
              {/*</Text>*/}
              {/*</View>*/}
              {/*:*/}
              {/*<View onClick={this.sendAt.bind(this, data.air.air_attr_2)} style={{*/}
              {/*height: "36rpx",*/}
              {/*width: "100rpx",*/}
              {/*backgroundColor: "#80c269",*/}
              {/*display: "flex",*/}
              {/*borderRadius: "18rpx",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center"*/}
              {/*}}>*/}
              {/*<Text style={{fontSize: "22rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*{data.air && data.air.air_attr_2 ? data.air.air_attr_2.name : ""}*/}
              {/*</Text>*/}
              {/*</View>}*/}

              {/*</View>*/}
              {/*:*/}
              {/*<View style={{marginTop: "10rpx"}}>*/}


              {/*<View style={{*/}
              {/*height: "36rpx",*/}
              {/*width: "100rpx",*/}
              {/*backgroundColor: "#ececec",*/}
              {/*display: "flex",*/}
              {/*borderRadius: "18rpx",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center"*/}
              {/*}}>*/}
              {/*<Text style={{fontSize: "22rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*{data.air && data.air.air_attr_2 ? data.air.air_attr_2.name : ""}*/}
              {/*</Text>*/}
              {/*</View>*/}

              {/*</View>*/}
              {/*}*/}

              {/*</View>*/}
              {/*:*/}
              {/*<View*/}
              {/*style={{*/}
              {/*flex: 1,*/}
              {/*display: "flex",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center",*/}
              {/*flexDirection: "column",*/}
              {/*borderRight: "1px solid #e0e0e0",*/}
              {/*backgroundColor: "#eb6877"*/}
              {/*}}>*/}
              {/*<View>*/}
              {/*<Text style={{fontSize: "24rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*空调2*/}
              {/*</Text>*/}
              {/*</View>*/}
              {/*<View>*/}
              {/*<Text style={{fontSize: "22rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*故障*/}
              {/*</Text>*/}
              {/*</View>*/}

              {/*</View>*/}
              {/*}*/}
              {/*</View>}*/}
              {/*{data.air && data.air.air_status_3 == 0 && data.air.air_attr_3.name&&*/}
              {/*<View style={{flex:1,display:"flex"}}>*/}
              {/*{data.air && data.air.air_status_3 == 0 ?*/}
              {/*<View*/}
              {/*style={data.air.air_attr_3.is_run ? {*/}
              {/*flex: 1,*/}
              {/*display: "flex",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center",*/}
              {/*flexDirection: "column",*/}
              {/*borderRight: "1px solid #e0e0e0",*/}
              {/*background: "#4594ff",*/}
              {/*backgroundImage: `url("../../assets/images/xue.png")`,*/}
              {/*backgroundRepeat: "no-repeat",*/}
              {/*backgroundSize: "100% 100%"*/}
              {/*} : {*/}
              {/*flex: 1,*/}
              {/*display: "flex",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center",*/}
              {/*flexDirection: "column",*/}
              {/*borderRight: "1px solid #e0e0e0"*/}
              {/*}}>*/}
              {/*<View>*/}
              {/*<Text style={{*/}
              {/*fontSize: "24rpx",*/}
              {/*color: data.air.air_attr_3.is_run ? "#ffffff" : "#767676",*/}
              {/*fontWeight: "bold"*/}
              {/*}}>*/}
              {/*空调3*/}
              {/*</Text>*/}
              {/*</View>*/}
              {/*{data.status == 1 ?*/}
              {/*<View style={{marginTop: "10rpx"}}>*/}
              {/*{data.air && data.air.air_attr_3 && data.air && data.air.air_attr_3.is_check ?*/}
              {/*<View onClick={this.sendAt.bind(this, data.air.air_attr_3)} style={{*/}
              {/*height: "36rpx",*/}
              {/*width: "100rpx",*/}
              {/*backgroundColor: "#aa89bd",*/}
              {/*display: "flex",*/}
              {/*borderRadius: "18rpx",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center"*/}
              {/*}}>*/}
              {/*<Text style={{fontSize: "22rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*{data.air && data.air.air_attr_3 ? data.air.air_attr_3.name : ""}*/}
              {/*</Text>*/}
              {/*</View>*/}
              {/*:*/}
              {/*<View onClick={this.sendAt.bind(this, data.air.air_attr_3)} style={{*/}
              {/*height: "36rpx",*/}
              {/*width: "100rpx",*/}
              {/*backgroundColor: "#80c269",*/}
              {/*display: "flex",*/}
              {/*borderRadius: "18rpx",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center"*/}
              {/*}}>*/}
              {/*<Text style={{fontSize: "22rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*{data.air && data.air.air_attr_3 ? data.air.air_attr_3.name : ""}*/}
              {/*</Text>*/}
              {/*</View>}*/}

              {/*</View>*/}
              {/*:*/}
              {/*<View style={{marginTop: "10rpx"}}>*/}
              {/*<View style={{*/}
              {/*height: "36rpx",*/}
              {/*width: "100rpx",*/}
              {/*backgroundColor: "#ececec",*/}
              {/*display: "flex",*/}
              {/*borderRadius: "18rpx",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center"*/}
              {/*}}>*/}
              {/*<Text style={{fontSize: "22rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*{data.air && data.air.air_attr_3 ? data.air.air_attr_3.name : ""}*/}
              {/*</Text>*/}
              {/*</View>*/}

              {/*</View>*/}
              {/*}*/}

              {/*</View>*/}
              {/*:*/}
              {/*<View*/}
              {/*style={{*/}
              {/*flex: 1,*/}
              {/*display: "flex",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center",*/}
              {/*flexDirection: "column",*/}
              {/*borderRight: "1px solid #e0e0e0",*/}
              {/*backgroundColor: "#eb6877"*/}
              {/*}}>*/}
              {/*<View>*/}
              {/*<Text style={{fontSize: "24rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*空调3*/}
              {/*</Text>*/}
              {/*</View>*/}
              {/*<View>*/}
              {/*<Text style={{fontSize: "22rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*故障*/}
              {/*</Text>*/}
              {/*</View>*/}

              {/*</View>*/}
              {/*}*/}
              {/*</View>}*/}
              {/*</View>*/}

              {/*</View>*/}
              {/*{data.air && data.air.drb_status == 0 && data.air.dr_brush.name&&*/}
              {/*<View style={{width: "170rpx",display:"flex"}}>*/}
              {/*{data.air && data.air.drb_status == 0 ?*/}
              {/*<View*/}
              {/*style={{*/}
              {/*width: "170rpx",*/}
              {/*display: "flex",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center",*/}
              {/*flexDirection: "column",*/}
              {/*zIndex: 2*/}
              {/*}}>*/}
              {/*<View>*/}
              {/*<Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>*/}
              {/*除尘刷*/}
              {/*</Text>*/}
              {/*</View>*/}
              {/*{data.status == 1 ?*/}
              {/*<View style={{marginTop: "10rpx"}}>*/}
              {/*{data.air && data.air.dr_brush && data.air && data.air.dr_brush.is_check ?*/}
              {/*<View onClick={this.sendAt.bind(this, data.air.dr_brush)} style={{*/}
              {/*height: "36rpx",*/}
              {/*width: "100rpx",*/}
              {/*backgroundColor: "#aa89bd",*/}
              {/*display: "flex",*/}
              {/*borderRadius: "18rpx",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center"*/}
              {/*}}>*/}
              {/*<Text style={{fontSize: "22rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*{data.air && data.air.dr_brush ? data.air.dr_brush.name : ""}*/}
              {/*</Text>*/}
              {/*</View>*/}
              {/*:*/}
              {/*<View onClick={this.sendAt.bind(this, data.air.dr_brush)} style={{*/}
              {/*height: "36rpx",*/}
              {/*width: "100rpx",*/}
              {/*backgroundColor: "#80c269",*/}
              {/*display: "flex",*/}
              {/*borderRadius: "18rpx",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center"*/}
              {/*}}>*/}
              {/*<Text style={{fontSize: "22rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*{data.air && data.air.dr_brush ? data.air.dr_brush.name : ""}*/}
              {/*</Text>*/}
              {/*</View>}*/}

              {/*</View>*/}
              {/*:*/}
              {/*<View style={{marginTop: "10rpx"}}>*/}
              {/*<View style={{*/}
              {/*height: "36rpx",*/}
              {/*width: "100rpx",*/}
              {/*backgroundColor: "#ececec",*/}
              {/*display: "flex",*/}
              {/*borderRadius: "18rpx",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center"*/}
              {/*}}>*/}
              {/*<Text style={{fontSize: "22rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*{data.air && data.air.dr_brush ? data.air.dr_brush.name : ""}*/}
              {/*</Text>*/}
              {/*</View>*/}

              {/*</View>*/}
              {/*}*/}
              {/*</View>*/}
              {/*:*/}
              {/*<View*/}
              {/*style={{*/}
              {/*width: "170rpx",*/}
              {/*display: "flex",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center",*/}
              {/*flexDirection: "column",*/}
              {/*zIndex: 2,*/}
              {/*backgroundColor: "#eb6877"*/}
              {/*}}>*/}
              {/*<View>*/}
              {/*<Text style={{fontSize: "24rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*除尘刷*/}
              {/*</Text>*/}
              {/*</View>*/}
              {/*<View style={{marginTop: "10rpx"}}>*/}

              {/*<Text style={{fontSize: "22rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*故障*/}
              {/*</Text>*/}


              {/*</View>*/}
              {/*</View>*/}

              {/*}*/}
              {/*</View>}*/}


              {/*</View>*/}


              {/*</View>}*/}
              {/*{data && data.pfan && */}
              {/*<View*/}
              {/*style={{*/}
              {/*overflow: "hidden",*/}
              {/*marginTop: "20px",*/}
              {/*borderTop: "5px solid #37d267",*/}
              {/*width: "96%",*/}
              {/*height: "150rpx",*/}
              {/*backgroundColor: "#ffffff",*/}
              {/*borderBottomLeftRadius: "10px",*/}
              {/*borderBottomRightRadius: "10px",*/}
              {/*display: "flex",*/}
              {/*position: "relative"*/}
              {/*}}>*/}

              {/*<View style={{flex: 1, display: "flex"}}>*/}
              {/*<View style={{flex: 1, display: "flex"}}>*/}
              {/*<View style={{*/}
              {/*width: "80rpx",*/}
              {/*display: "flex",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center",*/}
              {/*flexDirection: "column",*/}
              {/*marginLeft: "10rpx"*/}
              {/*}}>*/}
              {/*<View style={{*/}
              {/*width: "70rpx",*/}
              {/*height: "70rpx",*/}
              {/*borderRadius: "35rpx",*/}
              {/*display: "flex",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center",*/}
              {/*backgroundColor: "#cef6bb"*/}
              {/*}}>*/}
              {/*<Image src={"../../assets/images/d5.png"} style={{width: "35rpx", height: "35rpx"}}/>*/}

              {/*</View>*/}
              {/*<View>*/}
              {/*<Text style={{fontSize: "20rpx", color: "#22ac38"}}>*/}
              {/*正压风机*/}
              {/*</Text>*/}
              {/*</View>*/}

              {/*</View>*/}
              {/*<View style={{flex: 1, display: "flex", flexDirection: "column"}}>*/}
              {/*<View style={{height: "30px", display: "flex", alignItems: "center",}}>*/}
              {/*<View style={{flex: 1, display: "flex", alignItems: "center", justifyContent: "center"}}>*/}
              {/*<Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>*/}
              {/*风速*/}
              {/*</Text>*/}
              {/*</View>*/}
              {/*<View style={{flex: 3}}>*/}
              {/*</View>*/}


              {/*</View>*/}

              {/*<View style={{display: "flex", flex: 1}}>*/}
              {/*{data.pfan.attr_list.map((item, key) => {*/}
              {/*return (data.status == 1&&item.name!=""&&item.name!=0 ? <View key={key} onClick={this.sendAt.bind(this, item)} style={{*/}
              {/*flex: 1,*/}
              {/*display: "flex",*/}
              {/*alignItems: "center",*/}
              {/*flexDirection: "column"*/}
              {/*}}>*/}
              {/*<View style={{*/}
              {/*height: "50rpx",*/}
              {/*width: "100rpx",*/}
              {/*backgroundColor: item.is_check ? "#aa89bd" : "#e5e5e5",*/}
              {/*display: "flex",*/}
              {/*borderRadius: "10rpx",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center"*/}
              {/*}}>*/}
              {/*<Text style={{*/}
              {/*fontSize: "22rpx",*/}
              {/*color: item.is_check ? "#ffffff" : "#808080",*/}
              {/*fontWeight: "bold"*/}
              {/*}}>*/}
              {/*{item.name}*/}
              {/*</Text>*/}
              {/*</View>*/}

              {/*</View> : <View key={key} style={{*/}
              {/*flex: 1,*/}
              {/*display: "flex",*/}
              {/*alignItems: "center",*/}
              {/*flexDirection: "column"*/}
              {/*}}>*/}
              {/*<View style={{*/}
              {/*height: "50rpx",*/}
              {/*width: "100rpx",*/}
              {/*backgroundColor: "#ececec",*/}
              {/*display: "flex",*/}
              {/*borderRadius: "10rpx",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center"*/}
              {/*}}>*/}
              {/*<Text style={{fontSize: "22rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*{item.name}*/}
              {/*</Text>*/}
              {/*</View>*/}

              {/*</View>)*/}
              {/*})*/}
              {/*}*/}

              {/*/!*<View style={{flex:1,display:"flex",alignItems:"center",flexDirection:"column"}}>*!/*/}
              {/*/!*<View style={{height:"50rpx",width:"100rpx",backgroundColor:"#e5e5e5",display:"flex",borderRadius:"10rpx",alignItems:"center",justifyContent:"center"}}>*!/*/}
              {/*/!*<Text style={{fontSize:"22rpx",color:"#808080",fontWeight:"bold"}}>*!/*/}
              {/*/!*中*!/*/}
              {/*/!*</Text>*!/*/}
              {/*/!*</View>*!/*/}

              {/*/!*</View>*!/*/}
              {/*/!*<View style={{flex:1,display:"flex",alignItems:"center",flexDirection:"column"}}>*!/*/}
              {/*/!*<View style={{height:"50rpx",width:"100rpx",backgroundColor:"#e5e5e5",display:"flex",borderRadius:"10rpx",alignItems:"center",justifyContent:"center"}}>*!/*/}
              {/*/!*<Text style={{fontSize:"22rpx",color:"#808080",fontWeight:"bold"}}>*!/*/}
              {/*/!*低*!/*/}
              {/*/!*</Text>*!/*/}
              {/*/!*</View>*!/*/}

              {/*/!*</View>*!/*/}
              {/*/!*<View style={{flex:1,display:"flex",alignItems:"center",flexDirection:"column"}}>*!/*/}
              {/*/!*<View style={{height:"50rpx",width:"100rpx",backgroundColor:"#e5e5e5",display:"flex",borderRadius:"10rpx",alignItems:"center",justifyContent:"center"}}>*!/*/}
              {/*/!*<Text style={{fontSize:"22rpx",color:"#808080",fontWeight:"bold"}}>*!/*/}
              {/*/!*关*!/*/}
              {/*/!*</Text>*!/*/}
              {/*/!*</View>*!/*/}

              {/*/!*</View>*!/*/}
              {/*</View>*/}


              {/*</View>*/}

              {/*</View>*/}
              {/*{data.pfan && data.pfan.status == 1 ? <View style={{*/}
              {/*width: "170rpx",*/}
              {/*display: "flex",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center",*/}
              {/*flexDirection: "column",*/}
              {/*zIndex: 2,*/}
              {/*backgroundColor: "#eb6877"*/}
              {/*}}>*/}
              {/*<Text style={{fontSize: "24rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*故障*/}
              {/*</Text>*/}
              {/*</View>*/}
              {/*:*/}
              {/*<View style={{*/}
              {/*width: "170rpx",*/}
              {/*display: "flex",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center",*/}
              {/*flexDirection: "column",*/}
              {/*zIndex: 2,*/}
              {/*backgroundColor: "#37d267"*/}
              {/*}}>*/}
              {/*<Text style={{fontSize: "24rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*正常*/}
              {/*</Text>*/}
              {/*</View>}*/}


              {/*</View>*/}


              {/*</View>}*/}

              {/*{data && data.sfan && data.sfan.is_dispaly &&*/}
              {/*<View*/}
              {/*style={{*/}
              {/*overflow: "hidden",*/}
              {/*marginTop: "20px",*/}
              {/*borderTop: "5px solid #37d267",*/}
              {/*width: "96%",*/}
              {/*height: "150rpx",*/}
              {/*backgroundColor: "#ffffff",*/}
              {/*borderBottomLeftRadius: "10px",*/}
              {/*borderBottomRightRadius: "10px",*/}
              {/*display: "flex",*/}
              {/*position: "relative"*/}
              {/*}}>*/}

              {/*<View style={{flex: 1, display: "flex"}}>*/}
              {/*<View style={{flex: 1, display: "flex"}}>*/}
              {/*<View style={{*/}
              {/*width: "80rpx",*/}
              {/*display: "flex",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center",*/}
              {/*flexDirection: "column",*/}
              {/*marginLeft: "10rpx"*/}
              {/*}}>*/}
              {/*<View style={{*/}
              {/*width: "70rpx",*/}
              {/*height: "70rpx",*/}
              {/*borderRadius: "35rpx",*/}
              {/*display: "flex",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center",*/}
              {/*backgroundColor: "#cef6bb"*/}
              {/*}}>*/}
              {/*<Image src={"../../assets/images/d6.png"} style={{width: "35rpx", height: "35rpx"}}/>*/}

              {/*</View>*/}
              {/*<View>*/}
              {/*<Text style={{fontSize: "20rpx", color: "#22ac38"}}>*/}
              {/*负压风机*/}
              {/*</Text>*/}
              {/*</View>*/}

              {/*</View>*/}
              {/*<View style={{flex: 1, display: "flex", flexDirection: "column"}}>*/}
              {/*<View style={{height: "30px", display: "flex", alignItems: "center",}}>*/}
              {/*<View style={{flex: 1, display: "flex", alignItems: "center", justifyContent: "center"}}>*/}
              {/*<Text style={{fontSize: "24rpx", color: "#767676", fontWeight: "bold"}}>*/}
              {/*风速*/}
              {/*</Text>*/}
              {/*</View>*/}
              {/*<View style={{flex: 3}}>*/}
              {/*</View>*/}


              {/*</View>*/}

              {/*<View style={{display: "flex", flex: 1}}>*/}
              {/*{data.sfan.attr_list.map((item, key) => {*/}
              {/*return (data.status == 1 ? <View key={key} onClick={this.sendAt.bind(this, item)} style={{*/}
              {/*flex: 1,*/}
              {/*display: "flex",*/}
              {/*alignItems: "center",*/}
              {/*flexDirection: "column"*/}
              {/*}}>*/}
              {/*<View style={{*/}
              {/*height: "50rpx",*/}
              {/*width: "100rpx",*/}
              {/*backgroundColor: item.is_check ? "#aa89bd" : "#e5e5e5",*/}
              {/*display: "flex",*/}
              {/*borderRadius: "10rpx",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center"*/}
              {/*}}>*/}
              {/*<Text style={{*/}
              {/*fontSize: "22rpx",*/}
              {/*color: item.is_check ? "#ffffff" : "#808080",*/}
              {/*fontWeight: "bold"*/}
              {/*}}>*/}
              {/*{item.name}*/}
              {/*</Text>*/}
              {/*</View>*/}

              {/*</View> : <View key={key} style={{*/}
              {/*flex: 1,*/}
              {/*display: "flex",*/}
              {/*alignItems: "center",*/}
              {/*flexDirection: "column"*/}
              {/*}}>*/}
              {/*<View style={{*/}
              {/*height: "50rpx",*/}
              {/*width: "100rpx",*/}
              {/*backgroundColor: "#ececec",*/}
              {/*display: "flex",*/}
              {/*borderRadius: "10rpx",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center"*/}
              {/*}}>*/}
              {/*<Text style={{fontSize: "22rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*{item.name}*/}
              {/*</Text>*/}
              {/*</View>*/}

              {/*</View>)*/}
              {/*})*/}
              {/*}*/}

              {/*/!*<View style={{flex:1,display:"flex",alignItems:"center",flexDirection:"column"}}>*!/*/}
              {/*/!*<View style={{height:"50rpx",width:"100rpx",backgroundColor:"#e5e5e5",display:"flex",borderRadius:"10rpx",alignItems:"center",justifyContent:"center"}}>*!/*/}
              {/*/!*<Text style={{fontSize:"22rpx",color:"#808080",fontWeight:"bold"}}>*!/*/}
              {/*/!*中*!/*/}
              {/*/!*</Text>*!/*/}
              {/*/!*</View>*!/*/}

              {/*/!*</View>*!/*/}
              {/*/!*<View style={{flex:1,display:"flex",alignItems:"center",flexDirection:"column"}}>*!/*/}
              {/*/!*<View style={{height:"50rpx",width:"100rpx",backgroundColor:"#e5e5e5",display:"flex",borderRadius:"10rpx",alignItems:"center",justifyContent:"center"}}>*!/*/}
              {/*/!*<Text style={{fontSize:"22rpx",color:"#808080",fontWeight:"bold"}}>*!/*/}
              {/*/!*低*!/*/}
              {/*/!*</Text>*!/*/}
              {/*/!*</View>*!/*/}

              {/*/!*</View>*!/*/}
              {/*/!*<View style={{flex:1,display:"flex",alignItems:"center",flexDirection:"column"}}>*!/*/}
              {/*/!*<View style={{height:"50rpx",width:"100rpx",backgroundColor:"#e5e5e5",display:"flex",borderRadius:"10rpx",alignItems:"center",justifyContent:"center"}}>*!/*/}
              {/*/!*<Text style={{fontSize:"22rpx",color:"#808080",fontWeight:"bold"}}>*!/*/}
              {/*/!*关*!/*/}
              {/*/!*</Text>*!/*/}
              {/*/!*</View>*!/*/}

              {/*/!*</View>*!/*/}
              {/*</View>*/}


              {/*</View>*/}

              {/*</View>*/}
              {/*{data.sfan.status == 1 ? <View style={{*/}
              {/*width: "170rpx",*/}
              {/*display: "flex",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center",*/}
              {/*flexDirection: "column",*/}
              {/*zIndex: 2,*/}
              {/*backgroundColor: "#eb6877"*/}
              {/*}}>*/}
              {/*<Text style={{fontSize: "24rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*故障*/}
              {/*</Text>*/}
              {/*</View>*/}
              {/*:*/}
              {/*<View style={{*/}
              {/*width: "170rpx",*/}
              {/*display: "flex",*/}
              {/*alignItems: "center",*/}
              {/*justifyContent: "center",*/}
              {/*flexDirection: "column",*/}
              {/*zIndex: 2,*/}
              {/*backgroundColor: "#37d267"*/}
              {/*}}>*/}
              {/*<Text style={{fontSize: "24rpx", color: "#ffffff", fontWeight: "bold"}}>*/}
              {/*正常*/}
              {/*</Text>*/}
              {/*</View>}*/}

              {/*</View>*/}


              {/*</View>}*/}


            </View>}
          </View>}
          {current == 1 && <View style={{flex: 1, background: "#f0f2f5", minHeight: "100vh"}}>
            <View style={{display: "flex", justifyContent: "center"}}>

              <View style={{width: "90%", marginTop: "20rpx"}}>
                <AtSegmentedControl
                  selectedColor='#4bb33d'
                  values={['正常设备', '异常设备']}
                  onClick={this.setCurrent_b.bind(this)}
                  current={this.state.current_b}
                />
              </View>
            </View>
            <ScrollView>
              <View style={{
                padding: "10rpx",
                display: "flex",
                flexDirection: "column",
                alignItems: "center",
                paddingBottom: "100rpx"
              }}>
                {this.state.current_b === 0 && jz_normal_list.length > 0 && jz_normal_list.map((item, key) => {
                  return (<View
                    key={key}
                    onClick={this.toDevice.bind(this, item.id)}
                    style={{
                      height: "180rpx",
                      background: "#ffffff",
                      borderRadius: "20rpx",
                      margin: "20rpx",
                      display: "flex",
                      width: "85vw",
                      backgroundImage: `url("http://wx.engconn.com/static/uploads/2020-01-11/634181578679245.jpg")`,
                      backgroundRepeat: "no-repeat",
                      backgroundSize: "90px 90px",
                      backgroundPosition: "bottom right"
                    }}>
                    <View style={{width: "180rpx", display: "flex", alignItems: "center", justifyContent: "center"}}>
                      <Image src={item.img ? item.img : "../../assets/images/icon_18.png"}
                             style={{maxHeight: "100rpx", maxWidth: "100rpx"}}/>
                    </View>

                    <View style={{flex: 1, display: "flex", flexDirection: "column", justifyContent: "center"}}>
                      <View>
                        <Text style={{fontSize: "26rpx", color: "#333333", fontWeight: "bold"}}>
                          {item.name}
                        </Text>
                      </View>
                      <View>
                        <Text style={{fontSize: "26rpx", color: "#333333"}}>
                          {item.inc_type}
                        </Text>
                      </View>
                      <View style={{marginTop: "20rpx"}}>
                        <Text style={{fontSize: "24rpx", color: "#333333"}}>
                          运行状态:
                        </Text>
                        {item.status == 1 ? <Text style={{fontSize: "24rpx", color: "#4bb33d", marginLeft: "10rpx"}}>
                          正常运行
                        </Text> : <Text style={{fontSize: "24rpx", color: "#cc0033", marginLeft: "10rpx"}}>
                          运行异常
                        </Text>}
                      </View>
                    </View>
                  </View>)
                })}

                {this.state.current_b === 1 && jz_error_list.length > 0 && jz_error_list.map((item, key) => {
                  return (<View
                    key={key}
                    onClick={this.toDevice.bind(this, item.id)}
                    style={{
                      height: "180rpx",
                      background: "#ffffff",
                      borderRadius: "20rpx",
                      margin: "20rpx",
                      display: "flex",
                      width: "85vw"
                    }}>
                    <View style={{width: "180rpx", display: "flex", alignItems: "center", justifyContent: "center"}}>
                      <Image src={item.img ? item.img : "../../assets/images/icon_18.png"} style={{width: "50rpx"}}
                             mode={"widthFix"}/>
                    </View>

                    <View style={{flex: 1, display: "flex", flexDirection: "column", justifyContent: "center"}}>
                      <View>
                        <Text style={{fontSize: "26rpx", color: "#333333", fontWeight: "bold"}}>
                          {item.name}
                        </Text>
                      </View>
                      <View>
                        <Text style={{fontSize: "26rpx", color: "#333333"}}>
                          {item.inc_type}
                        </Text>
                      </View>
                      <View style={{marginTop: "20rpx"}}>
                        <Text style={{fontSize: "24rpx", color: "#333333"}}>
                          运行状态:
                        </Text>
                        {item.status == 1 ? <Text style={{fontSize: "24rpx", color: "#4bb33d", marginLeft: "10rpx"}}>
                          正常运行
                        </Text> : <Text style={{fontSize: "24rpx", color: "#cc0033", marginLeft: "10rpx"}}>
                          运行异常
                        </Text>}
                      </View>
                    </View>
                  </View>)
                })}
                {/*<View style={{background:"#ffffff",margin:"10rpx",borderRadius:"20rpx",overflow:"hidden",padding:"10rpx",display:"flex"}}>*/}
                {/*<View style={{padding:"20rpx",display:"flex",alignItems:"center",justifyContent:"center"}}>*/}
                {/*<Image src={"../../assets/images/icon_18.png"} style={{width:"80rpx"}} mode={"widthFix"}/>*/}

                {/*</View>*/}
                {/*<View style={{width:"flex:1"}}>*/}

                {/*<View style={{display:"flex",flex:1}}>*/}
                {/*<View style={{display:"flex",flex:1,padding:"10rpx"}}>*/}
                {/*<View style={{width:"160rpx",height:"40rpx",borderRadius:"20rpx",backgroundColor:"#ae5da0",  alignItems: "center",*/}
                {/*justifyContent: "center",display:"flex",flex:1}}>*/}
                {/*<Text style={{color: "#ffffff", fontSize: "22rpx"}}>名称</Text>*/}
                {/*</View>*/}
                {/*<View style={{height:"40rpx",borderRadius:"20rpx",width:"60rpx",  alignItems: "center",*/}
                {/*justifyContent: "center",display:"flex",    paddingLeft: "20rpx",*/}
                {/*paddingRight: "20rpx",}}>*/}
                {/*<Text style={{color: "#333333", fontSize: "22rpx"}}>231V</Text>*/}
                {/*</View>*/}


                {/*</View>*/}
                {/*<View style={{display:"flex",flex:1,padding:"10rpx"}}>*/}
                {/*<View style={{width:"160rpx",height:"40rpx",borderRadius:"20rpx",backgroundColor:"#ae5da0",  alignItems: "center",*/}
                {/*justifyContent: "center",display:"flex",flex:1}}>*/}
                {/*<Text style={{color: "#ffffff", fontSize: "22rpx"}}>类型</Text>*/}
                {/*</View>*/}
                {/*<View style={{height:"40rpx",borderRadius:"20rpx",width:"60rpx",  alignItems: "center",*/}
                {/*justifyContent: "center",display:"flex",    paddingLeft: "20rpx",*/}
                {/*paddingRight: "20rpx",}}>*/}
                {/*<Text style={{color: "#333333", fontSize: "22rpx"}}>231V</Text>*/}
                {/*</View>*/}


                {/*</View>*/}
                {/*</View>*/}
                {/*<View style={{display:"flex",flex:1}}>*/}
                {/*<View style={{display:"flex",flex:1,padding:"10rpx"}}>*/}
                {/*<View style={{width:"160rpx",height:"40rpx",borderRadius:"20rpx",backgroundColor:"#ae5da0",  alignItems: "center",*/}
                {/*justifyContent: "center",display:"flex"}}>*/}
                {/*<Text style={{color: "#ffffff", fontSize: "22rpx"}}>状态</Text>*/}
                {/*</View>*/}

                {/*</View>*/}


                {/*</View>*/}
                {/*<View style={{display:"flex",flex:1}}>*/}
                {/*<View style={{border:"1px solid #f0f2f5",borderRadius:"10rpx",padding:"10rpx",flex:1,height:"60rpx"}}>*/}
                {/*222*/}
                {/*</View>*/}
                {/*</View>*/}
                {/*<View style={{display:"flex",flex:1}}>*/}
                {/*<View style={{height:"40rpx", alignItems: "center",*/}
                {/*justifyContent: "center",display:"flex"}}>*/}
                {/*<Text style={{color: "#999999", fontSize: "22rpx"}}>创建时间:xxxxxxx</Text>*/}
                {/*</View>*/}


                {/*</View>*/}
                {/*<View style={{display:"flex",flex:1}}>*/}
                {/*<View style={{display:"flex",flex:1,justifyContent:"flex-end"}}>*/}
                {/*<View style={{width:"160rpx",height:"50rpx",borderRadius:"25rpx",backgroundColor:"#ae5da0",  alignItems: "center",*/}
                {/*justifyContent: "center",display:"flex",margin:"10rpx"}}>*/}
                {/*<Text style={{color: "#ffffff", fontSize: "22rpx"}}>直流电压</Text>*/}
                {/*</View>*/}
                {/*<View style={{width:"160rpx",height:"50rpx",borderRadius:"25rpx",backgroundColor:"#ae5da0",  alignItems: "center",*/}
                {/*justifyContent: "center",display:"flex",margin:"10rpx"}}>*/}
                {/*<Text style={{color: "#ffffff", fontSize: "22rpx"}}>直流电压</Text>*/}
                {/*</View>*/}
                {/*</View>*/}


                {/*</View>*/}
                {/*</View>*/}
                {/*</View>*/}

              </View>
            </ScrollView>


            {/*<View style={{display:"flex",alignItems:"center",justifyContent:"center",background:"#ffffff",height:"120rpx",position:"fixed",bottom:"100rpx",width:"100%",borderTop:"2rpx #f0f2f5 solid"}}>*/}
            {/*<View onClick={this.addDevice.bind(this)} style={{background:"#4bb33d",borderRadius:"10rpx",width:"80%",height:"70rpx",display:"flex",alignItems:"center",justifyContent:"center",}}>*/}
            {/*<Text style={{color:"#ffffff",fontSize:"26rpx"}}>*/}
            {/*添加设备*/}
            {/*</Text>*/}

            {/*</View>*/}

            {/*</View>*/}
          </View>}

          {current == 2 && <View style={{flex: 1, background: "#ffffff"}}>

            <View style={{paddingBottom: "120rpx"}}>
              <View style={{
                padding: "10rpx",
                display: "flex",
                backgroundColor: "#f0f2f5",
                height: "70rpx",
                alignItems: "center"
              }}>
                <View style={{width: "10rpx", backgroundColor: "#2bb06e", borderRadius: "5rpx", height: "60%"}}>

                </View>
                <View style={{flex: 1, paddingLeft: "10px", display: "flex", alignItems: "center"}}>
                  <Text style={{color: "#333333", fontSize: "30rpx"}}>
                    基本信息
                  </Text>
                </View>
              </View>

              <View style={{display: "flex", borderBottom: "2rpx solid #f0f2f5", padding: "20rpx"}}>
                <View style={{display: "flex", alignItems: "center", justifyContent: "center", width: "100rpx"}}>
                  <Text style={{color: "#666666", fontSize: "26rpx"}}>
                    名称
                  </Text>

                </View>
                <View style={{flex: 1, justifyContent: "center", alignItems: "center", display: "flex"}}>

                  {/*<Text style={{color: "#666666", fontSize: "26rpx"}}>*/}
                    {/*{detail ? detail.name : ""}*/}
                  {/*</Text>*/}
                  <AtInput
                    name='name'
                    type='text'
                    placeholder=''
                    border={false}
                    style={{width:"100%"}}
                    value={detail ? detail.name : ""}
                    onChange={this.handleChangeName.bind(this)}
                  />
                </View>
              </View>
              <View style={{display: "flex", borderBottom: "2rpx solid #f0f2f5", padding: "20rpx"}}>
                <View style={{display: "flex", alignItems: "center", justifyContent: "center", width: "100rpx"}}>
                  <Text style={{color: "#666666", fontSize: "26rpx"}}>
                    类型
                  </Text>
                </View>
                <View style={{flex: 1, justifyContent: "flex-end", alignItems: "center", display: "flex"}}>
                  <Text style={{color: "#666666", fontSize: "26rpx"}}>
                    {detail ? detail.inc_type : ""}
                  </Text>
                </View>
              </View>
              <View style={{display: "flex", borderBottom: "2rpx solid #f0f2f5", padding: "20rpx"}}>
                <View style={{display: "flex", alignItems: "center", justifyContent: "center", width: "100rpx"}}>
                  <Text style={{color: "#666666", fontSize: "26rpx"}}>
                    地址
                  </Text>
                </View>
                <View style={{flex: 1, justifyContent: "flex-end", alignItems: "center", display: "flex"}}>
                  <Text style={{color: "#666666", fontSize: "26rpx"}}>
                    {detail ? detail.address : ""}
                  </Text>
                </View>
              </View>
              <View style={{
                padding: "10rpx",
                display: "flex",
                backgroundColor: "#f0f2f5",
                height: "70rpx",
                alignItems: "center"
              }}>
                <View style={{width: "10rpx", backgroundColor: "#2bb06e", borderRadius: "5rpx", height: "60%"}}>

                </View>
                <View style={{flex: 1, paddingLeft: "10px", display: "flex", alignItems: "center"}}>
                  <Text style={{color: "#333333", fontSize: "30rpx"}}>
                    图片
                  </Text>
                </View>
              </View>
              <View style={{background: "#ffffff", padding: "10rpx"}}>
                <View style={{display: "flex", flexWrap: "wrap", paddingTop: "10rpx"}}>
                  {detail && detail.img && <View style={{
                    width: "160rpx",
                    height: "200rpx",
                    margin: "10rpx",
                    borderRadius: "10rpx",
                    border: "#f0f2f5 solid 1rpx",
                    display: "flex",
                    alignItems: "center",
                    justifyContent: "center",
                    overflow: "hidden"
                  }}>
                    <Image src={detail.img.indexOf("ttp") >= 0 ? detail.img : set.domain + detail.img}
                           style={{width: "158rpx"}} mode={"widthFix"}/>
                  </View>}
                  <View onClick={this.upimage.bind(this)} style={{
                    width: "160rpx",
                    height: "200rpx",
                    margin: "10rpx",
                    border: "#f0f2f5 solid 1rpx",
                    borderRadius: "10rpx",
                    display: "flex",
                    alignItems: "center",
                    justifyContent: "center"
                  }}>
                    <Text style={{fontSize: "50rpx", color: "#999999"}}>+</Text>
                  </View>
                </View>
              </View>
              <View style={{
                padding: "10rpx",
                display: "flex",
                backgroundColor: "#f0f2f5",
                height: "70rpx",
                alignItems: "center"
              }}>
                <View style={{width: "10rpx", backgroundColor: "#2bb06e", borderRadius: "5rpx", height: "60%"}}>

                </View>
                <View style={{width: "80rpx", paddingLeft: "10px", display: "flex", alignItems: "center"}}>
                  <Text style={{color: "#333333", fontSize: "30rpx"}}>
                    位置
                  </Text>
                </View>
                <View style={{
                  display: "flex",
                  padding: "10rpx",
                  flex: 1,
                  justifyContent: "space-between",
                  alignItems: "center"
                }}>

                  <View>
                    <View
                      onClick={this.goLocation.bind(this)}
                      style={{
                        background: "#4bb33d",
                        borderRadius: "10rpx",
                        width: "180rpx",
                        height: "50rpx",
                        display: "flex",
                        alignItems: "center",
                        justifyContent: "center",
                      }}>
                      <Text style={{color: "#ffffff", fontSize: "26rpx"}}>
                        导航
                      </Text>

                    </View>
                  </View>
                  <View>
                    <View
                      onClick={this.setLocation.bind(this)}
                      style={{
                        background: "#4bb33d",
                        borderRadius: "10rpx",
                        width: "180rpx",
                        height: "50rpx",
                        display: "flex",
                        alignItems: "center",
                        justifyContent: "center",
                      }}>
                      <Text style={{color: "#ffffff", fontSize: "26rpx"}}>
                        更改坐标
                      </Text>

                    </View>
                  </View>
                  <View>
                    <View
                      onClick={this.saveJz.bind(this, jzlist)}
                      style={{
                        background: "#4bb33d",
                        borderRadius: "10rpx",
                        width: "180rpx",
                        height: "50rpx",
                        display: "flex",
                        alignItems: "center",
                        justifyContent: "center",
                        marginLeft: "10px"
                      }}>
                      <Text style={{color: "#ffffff", fontSize: "26rpx"}}>
                        保存设置
                      </Text>

                    </View>
                  </View>
                </View>
              </View>


              <View style={{background: "#ffffff", width: "100%", height: "600rpx", paddingTop: "5rpx"}}>
                <View style={{flex: 1, display: "flex", height: "26px", alignItems: "center"}}>
                  <Text style={{
                    color: "#333333",
                    fontSize: "24rpx",
                    marginLeft: "20rpx"
                  }}>经度:{jzlist[0] && !isNaN(jzlist[0]) ? jzlist[0].longitude.toFixed(4) : 112}</Text>
                  <Text style={{
                    color: "#333333",
                    fontSize: "24rpx",
                    marginLeft: "20rpx"
                  }}>纬度:{jzlist[0] && !isNaN(jzlist[0]) ? jzlist[0].latitude.toFixed(4) : 28}</Text>
                </View>
                <Map
                  longitude={jzlist[0] && !isNaN(jzlist[0]) ? jzlist[0].longitude : 112}
                  latitude={jzlist[0] && !isNaN(jzlist[0]) ? jzlist[0].latitude : 28}
                  markers={jzlist}
                  style={{width: "100%", height: "100%"}}/>
              </View>

            </View>
            {/*<View*/}
            {/*style={{*/}
            {/*display: "flex",*/}
            {/*alignItems: "center",*/}
            {/*justifyContent: "center",*/}
            {/*background: "#ffffff",*/}
            {/*height: "120rpx",*/}
            {/*position: "fixed",*/}
            {/*bottom: "0",*/}
            {/*width: "100%",*/}
            {/*borderTop: "2rpx #f0f2f5 solid"*/}
            {/*}}>*/}
            {/*<View onClick={this.saveJz.bind(this,jzlist)} style={{*/}
            {/*background: "#4bb33d",*/}
            {/*borderRadius: "10rpx",*/}
            {/*width: "80%",*/}
            {/*height: "70rpx",*/}
            {/*display: "flex",*/}
            {/*alignItems: "center",*/}
            {/*justifyContent: "center",*/}
            {/*}}>*/}
            {/*<Text style={{color: "#ffffff", fontSize: "26rpx"}}>*/}
            {/*保存设置*/}
            {/*</Text>*/}

            {/*</View>*/}

            {/*</View>*/}
          </View>}
        </ScrollView>
        <AtTabBar
          fixed
          color="#333333"
          selectedColor={"#4bb33d"}
          fontSize={"26rpx"}
          tabList={[
            {title: '基站首页', key: 0, iconType: 'home',},
            {title: '设备管理', key: 1, iconType: 'numbered-list',},
            {title: '基站详情', key: 2, iconType: 'alert-circle'}
          ]}
          onClick={this.setCurrent.bind(this)}
          current={this.state.current}
        />
      </View>
    )
  }
}

const mapstate = state => {
  return {
    userinfo: state.usermodel,
    cart_num: state.cart_num,
    cart: state.cart,
    goodslist: state.goodslist,
    vip: state.vip,
    progress: state.progress,
    pushdata: state.pushdata,
    wxuser: state.wxusermodel, sys_config: state.sys_config,
    gytoken: state.gytoken
  }
}
export default connect(mapstate)(add_devices)

